<%@ page language="java" pageEncoding="UTF-8" %>
<!doctype html>
<html lang="zh-CN">
<head>
    <%@include file="/WEB-INF/views/commons/common.jsp" %>
    <link rel="stylesheet" type="text/css" href="${base_href}/static/ui-frame/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css"
          href="${base_href}/static/ui-frame/bootstrap-dialog3/css/bootstrap-dialog.css">
    <link rel="stylesheet" type="text/css"
          href="${base_href}/static/ui-frame/validation-engine/validationEngine.jquery.css">
    <link rel="stylesheet" type="text/css"
          href="${base_href}/static/ui-frame/jquery-easyui/1.4.3/themes/metro/easyui.css">
    <link rel="stylesheet" type="text/css"
          href="${base_href}/static/ui-frame/font-awesome/4.3.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="${base_href}/static/ui-frame/bootstrap/3.3.5/css/build.css">

    <link rel="stylesheet" type="text/css" href="${base_href}/static/ui-frame/webuploader/0.1.5/webuploader.css">
    <link rel="stylesheet" type="text/css" href="${base_href}/static/ui-frame/viewer/viewer.css">
    <link rel="stylesheet" type="text/css" href="${base_href}//static/ui-frame/ztree-v3/css/zTreeStyle/zTreeStyle.css">

    <link rel="stylesheet" type="text/css" href="${base_href}/static/css/search-theme.css">
    <link rel="stylesheet" type="text/css" href="${base_href}/static/css/form-theme.css">

    <title>银成教育</title>
</head>
<body data-spy="scroll" data-target="#myScrollspy" data-offset="350">


<div class="main-wrap">

    <!-- 工具条 start-->
    <div class="container-fluid form-body-header">
        <div class="container">
            <div class="row tool-bar">
                <div class="col-xs-12">
                    <button type="button" class="btn btn-sm tool-btn" id="closeBtn">关闭</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 工具条 end-->

    <!-- 表单 start-->
    <div class="container-fluid">
        <form id="form">

            <input type="hidden" name="id" value="${form.id }"/>
            <input type="hidden" name="paperId" value="${form.paperId }"/>

            <div class="container form-body-div">
                <div class="row text-center title-body" id="baseinfo">
                    试卷详细信息<br/>
                </div>
                <div class="row pannel-title">
                    <span>基本信息</span> <a href="javascript:void(0);" class="hide-next-btn">收起</a>
                </div>
                <div class="row pannel-body">
                    <table class="form-table">
                        <tr>
                            <th class="col-xs-2 ">试卷名称</th>
                            <td class="col-xs-8">
                                ${form.paperName}
                            </td>
                        </tr>
                        <tr>
                            <th class="col-xs-2">题号</th>
                            <th class="col-xs-8">候选项</th>
                        </tr>
                        <c:forEach items="${form.paperResultDetails }" var="detail" varStatus="status">
                            <c:if test="${detail.quesType eq '2' }">
                                <tr>

                                    <th class="col-xs-2" rowspan="4">${status.index+1}</th>
                                    <td class="col-xs-8">
                                        主题干：
                                        <div class="pre-div">
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${detail.question}</div>
                                    </td>
                                </tr>
                                <tr>

                                    <td class="col-xs-8">
                                        分题干：
                                        <div class="pre-div">
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${detail.stem}</div>
                                    </td>
                                </tr>
                            </c:if>


                            <c:if test="${detail.quesType ne '2' }">
                                <tr>

                                    <th class="col-xs-2" rowspan="3">${status.index+1}</th>
                                    <td class="col-xs-8">
                                        问题：
                                        <div class="pre-div">
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${detail.question}</div>
                                    </td>
                                </tr>
                            </c:if>

                            <tr>
                                <td class="col-xs-8">
                                    <c:if test="${detail.quesType eq '4' }">
                                        <c:forEach items="${detail.options }" var="option" varStatus="optionStatus">
                                            <div class="checkbox checkbox-success">
                                                <input type="checkbox"
                                                       name="paperResultDetails['${status.index}'].myAnswer"
                                                       <c:if test="${fn:contains(detail.myAnswer,answers[optionStatus.index])}">checked="checked"</c:if>
                                                       id="myAnswer['${status.index}']['${optionStatus.index }']"
                                                       value="${answers[optionStatus.index] }">
                                                <label for="myAnswer['${status.index}']['${optionStatus.index }']">
                                                        ${answers[optionStatus.index] }：${option}
                                                </label>
                                            </div>
                                        </c:forEach>
                                    </c:if>
                                    <c:if test="${detail.quesType ne '4' }">
                                        <c:forEach items="${detail.options }" var="option" varStatus="optionStatus">
                                            <div class="checkbox checkbox-success">
                                                <input type="radio"
                                                       name="paperResultDetails['${status.index}'].myAnswer" disabled
                                                       <c:if test="${answers[optionStatus.index] eq detail.myAnswer}">checked="checked"</c:if>
                                                       id="myAnswer['${status.index}']['${optionStatus.index }']"
                                                       value="${answers[optionStatus.index] }">
                                                <label for="myAnswer['${status.index}']['${optionStatus.index }']">
                                                        ${answers[optionStatus.index] }：${option}
                                                </label>
                                            </div>
                                        </c:forEach>
                                    </c:if>
                                </td>
                            </tr>
                            <tr>
                                <td class="col-xs-8">
                                    <p>正确答案：${detail.answer }</p>
                                    <p>解析：${detail.analysis }</p>
                                </td>
                            </tr>
                        </c:forEach>

                    </table>
                </div>
            </div>
        </form>
    </div>
    <!-- 表单 end-->

</div>
<script type="text/javascript" src="${base_href}/static/ui-frame/jquery/1.11.3/jquery.js"></script>
<script type="text/javascript" src="${base_href}/static/ui-frame/bootstrap/3.3.5/js/bootstrap.js"></script>
<script type="text/javascript" src="${base_href}/static/ui-frame/bootstrap-dialog3/js/bootstrap-dialog.js"></script>
<script type="text/javascript"
        src="${base_href}/static/ui-frame/validation-engine/jquery.validationEngine-zh_CN.js"></script>
<script type="text/javascript" src="${base_href}/static/ui-frame/validation-engine/jquery.validationEngine.js"></script>
<script type="text/javascript" src="${base_href}/static/ui-frame/My97DatePicker/WdatePicker.js"></script>

<script type="text/javascript" src="${base_href}/static/support/paperresult/answer.js"></script>

<script type="text/javascript">
    $(function () {
        $('#form').validationEngine('attach', {
            maxErrorsPerField: 1,
            scroll: false,
            validationEventTrigger: "keyup blur change focus",
            ValidateNoneVisibleFields: true,//验证隐藏域
            promptPosition: "topRight" //验证弹出框的位置，topRight,topLeft,bottomRight,bottomLeft,centerRight,centerLeft,inline
        });

        $("#closeBtn").click(function () {
            window.close();
        });
    });

</script>
</body>
</html>
